class CityChannel < ActiveRecord::Base
  has_paper_trail :version => :paper_trail_version, :versions => :paper_trail_versions
  attr_protected

  #attr_accessible :city, :city_id
  belongs_to :category
  has_many :programs

  default_scope where("mode is not null").order(:seq)

  scope :published, where(:published => true)
  scope :dvb, where(:mode => 'dvb')
  scope :dtmb, where(:mode => 'dtmb')
  scope :cmmb, where(:mode => 'cmmb')

  validates :city_name, :mode, :presence => true

  def name
    self.mode
  end


end
